public class SoluTion {
    public Boolean test(String arr1,String arr2) {
        int len1 = arr1.length();
        int len2 = arr2.length();
        int count = 0;
        if(len2 - len1 > 1) {
            return false;
        }
        if(len2 == len1) {
            for(int i = 0; i < len1; i++) {
                if(arr1.charAt(i) != arr2.charAt(i)) {
                    count++;
                }
            }
        }
        if(count > 1) {
            return false;
        }
        count = 0;
        int cmd = 0;
        for(int i = 0; i < len2; i ++) {
            if(arr1.charAt(cmd) != arr2.charAt(i)) {
                count++;
            } else {
                cmd++;
            }
        }
        if(count > 1) {
            return false;
        }
        return true;
    }
}
